package tgc.edu.demo.jkxt.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import tgc.edu.demo.jkxt.custom.BaseService;
import tgc.edu.demo.jkxt.entity.Question;
import tgc.edu.demo.jkxt.repository.QuestionRepository;

@Service
public class QuestionService extends BaseService<Question, Integer>{
	@Autowired
	private QuestionRepository questionDAO;
	public List<Question> findQuestionByCourseId(Integer id) {
	return questionDAO.findQuestionByCourseId(id);
		
	}
	public void deleteQuestionAndXuanxiang(Integer id) {
		questionDAO.deleteQuestionAndXuanxiang(id);
		
	}
	public void deleteTikuAndQuestion(Integer id) {
		// TODO Auto-generated method stub
		questionDAO.deleteTikuAndQuestion(id);
	}

}
